﻿@using Abp.Application.Services.Dto
@using Abp.Timing;
@using Akso.Web.Areas.Mpa.Models.Common.Modals
@model Akso.Web.Areas.Mpa.Models.Profile.MySettingsViewModel

@Html.Partial("~/Areas/Mpa/Views/Common/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel(L("MySettings")))

<div class="modal-body">
    <form name="MySettingsModalForm">
        <div class="form-group form-md-line-input form-md-floating-label no-hint">
            <input class="form-control edited" type="text" name="Name" value="@Model.Name" required maxlength="@Akso.Authorization.Users.User.MaxNameLength">
            <label>@L("Name")</label>
        </div>

        <div class="form-group form-md-line-input form-md-floating-label no-hint">
            <input type="text" name="Surname" class="form-control edited" value="@Model.Surname" required maxlength="@Akso.Authorization.Users.User.MaxSurnameLength">
            <label>@L("Surname")</label>
        </div>

        <div class="form-group form-md-line-input form-md-floating-label no-hint">
            <input type="email" name="EmailAddress" class="form-control edited" value="@Model.EmailAddress" required maxlength="@Akso.Authorization.Users.User.MaxEmailAddressLength">
            <label>@L("EmailAddress")</label>
        </div>

        <div class="form-group form-md-line-input form-md-floating-label no-hint">
            <input type="text" name="PhoneNumber" class="form-control edited" value="@Model.PhoneNumber" maxlength="@Akso.Authorization.Users.User.MaxPhoneNumberLength">
            <label>@L("PhoneNumber")</label>
        </div>

        <div class="form-group form-md-line-input form-md-floating-label">
            <input type="text" @Html.Raw(!Model.CanChangeUserName ? "disabled=\"disabled\"" : "") class="form-control edited" value="@Model.UserName" name="UserName" required maxlength="@Akso.Authorization.Users.User.MaxUserNameLength">
            <label>@L("UserName")</label>
            @if (!Model.CanChangeUserName)
            {
                <span class="help-block">@L("CanNotChangeAdminUserName")</span>
            }
        </div>
        @if (Clock.SupportsMultipleTimezone)
            {
            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                @Html.DropDownList("Timezone", Model.TimezoneItems.Select(i => i.ToSelectListItem()), new { @class = "form-control edited" })
                <label>@L("Timezone")</label>
            </div>
        }

    </form>
</div>

@Html.Partial("~/Areas/Mpa/Views/Common/Modals/_ModalFooterWithSaveAndCancel.cshtml")
